<div id="recommand">
<div class="fui-goods-group 2">
			<div ng-if="{from} ==1" class="fui-goods-item" ng-repeat="item in pagedata.recommand">
				<a href="{{item.url}}" data-nocache="true" style="position: relative;">
					<div class="image {{ifelse(option,'triangle','')}} {{ifelse(liststyle =='block one','auto','')}}" data-text="{option}" style="background-image: url('{{tomedia(item.imgurl)}}');">
                    </div>
				</a>
				<a href="{{item.url}}">
                        <div class="detail">
                            <div class="name" style="color: {titlecolor};">
                                    {{item.title}}
                                </div>
                             <div class="price" style="margin-top: 0.3rem">
								<span class="text">￥{{item.price}}</span>
									<span class="buy">
										购买
									</span>
							</div>
                            
                        </div>
                </a>
			</div>
</div>
</div>
<div ng-show="loading" class='infinite-loading'><span class='fui-preloader'></span><span style="margin-left:1.5rem"> 正在加载...</span></div>
<script type="text/javascript">
scope.loading = true;  //状态标记
//滚动加载
scope.scroll(function(){
	scope.loading = true;  //状态标记
	scope.$apply();
	setTimeout('getlist()',2000);
},false,'svposttext');
// 百度地图API功能
window.scope.location(function(re){
	getlist(re.lat_lng);
});
var page = 1;
function getlist(lat_lng){
		var params = {
					'plugin':'jy_weishop',
					'action':'index',
					'op':'getlist',
					'callback':function(data){
							if(data.error !=1){
							 for (var i=0;i<data.recommand.length;i++){
									scope.pagedata.recommand.push(data.list[i]);
								}
								if(page >1){
									$(".merchgroup").animate({scrollTop:0},300);
								}
								page++;
								scope.loading = false;
								scope.$apply();
							}else{
								onsole.log('error');
							};
					}
		}
		scope.post_json(params);
}
</script>
